<!--代码逻辑和样式库-->
<script src="./warning-list.component.js"></script>
<style src="./warning-list.scss" lang="scss" scoped></style>

<template>
  <div>
    <el-dialog title="全部报警数据" :visible.sync="showDialogFlag" width="90%" @close="closeDialog()">
      <div>
        <el-form label-position="right" :inline="true">
          <el-form-item>
            <el-input v-model="searchCriteria.keyword" placeholder="请输入车牌号或名称搜索" clearable></el-input>
          </el-form-item>
          <el-form-item>
            <el-select v-model="searchCriteria.type" placeholder="请选择解除状态" clearable class="aq-margin-left-4">
              <!-- el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option -->
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select v-model="searchCriteria.type" placeholder="请选择运输单位" clearable class="aq-margin-left-4">
              <!-- el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option -->
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search">
              查询
            </el-button>
            <el-button type="warning" icon="el-icon-refresh">
              重置
            </el-button>
          </el-form-item>
        </el-form>
        <el-table
          :data="data"
          highlight-current-row
          border
          @current-change="handleCurrentChange">
          <el-table-column align="center" width="70" label="排序" fixed>
            <template slot-scope="scope">
              <span>{{ (scope.$index + 1)+ (pageNum -1 )*recordNum }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="Serial No." label="报警时间" />
          <el-table-column prop="Serial No." label="车辆名称" />
          <el-table-column prop="Serial No." label="车牌号码" />
          <el-table-column prop="Serial No." label="运输单位" />
          <el-table-column prop="Serial No." label="车辆位置" />
          <el-table-column prop="Serial No." label="轨迹回放" width="80px">
            <template slot-scope="scope">
              <el-link type="primary" @click="goMachinePlayback(scope.row)">轨迹回放</el-link>
            </template>
          </el-table-column>
          <el-table-column prop="Serial No." label="压力数据" />
          <el-table-column prop="Serial No." label="排放次数" />
          <el-table-column prop="Serial No." label="排放累计时长" />
          <el-table-column prop="Serial No." label="人孔盖状态" />
          <el-table-column prop="Serial No." label="泄压阀状态" />
          <el-table-column prop="Serial No." label="排放报警" />
          <el-table-column prop="Serial No." label="设备断电报警" />
          <el-table-column prop="Serial No." label="油罐气密性报警" />
          <el-table-column prop="Serial No." label="油气超压报警" />
          <el-table-column prop="Serial No." label="解除状态" />
          <el-table-column prop="Serial No." label="操作" width="80px" align="center" fixed="right">
            <template slot-scope="scope">
              <el-link v-if="codesCheck.indexOf('Edit') !== -1" type="success" @click="goMachinePlayback(scope.row)">解除报警</el-link>
            </template>
          </el-table-column>
        </el-table>
        <!-- 分页插件 -->
        <pagination v-show="totalNum > 0" :total="totalNum" :page.sync="pageNum" :limit.sync="recordNum" @pagination="getDataList" />
      </div>
    </el-dialog>
  </div>
</template>
